﻿using DevExpress.XtraEditors;
using DXApplicationTangche.UC.圣同润.Service;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.圣同润.UC
{
    public partial class XtraUserControl选品 : DevExpress.XtraEditors.XtraUserControl
    {
        private List<ProductMenuDao> productMenus = new List<ProductMenuDao>();
        public XtraUserControl选品()
        {
            InitializeComponent();
        }
        public XtraUserControl选品(String bigCategory)
        {
            InitializeComponent();
            this.getData(bigCategory);
        }

        private void getData(String bigCategory)
        {
            this.productMenus = 圣同润Service.getProductMenuByBigCategory(bigCategory);
            this.gridControl选品.DataSource = this.productMenus;
            this.tileView选品.RefreshData();
        }

        private void tileView选品_ItemClick(object sender, DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs e)
        {
            try
            {
                String category = this.tileView选品.GetRowCellValue(e.Item.RowHandle, "category").ToString();
                //new Form商品分类一览(category).ShowDialog();
                new Form商品一览(category).ShowDialog();
            }
            catch { }
        }

    }
}
